Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipient headers for specific text searches #1552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

u7327620
Copy link
Collaborator

What does this PR do, and why?

Previously, when text searching, messages appear adjacent under the same heading, this can be confusing since they appear to be sequential but there may be messages in-between that don't meet the search criteria. PR adds logic to add recipient headers if the search isn't a specific dm or a topic narrow

Outstanding aspect(s)

  • Uncertain if automated tests are covering the feature or not (new to pytest)
  • Related follow-ups aren't fixed in this PR ... should they be?

External discussion & connections

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

Before: swappy-20241024-191318
After: swappy-20241024-191427

Previously, when text searching, messages appear
adjacently under the same heading, this can be confusing since they
appear sequentially but there may be messages inbetween that don't meet
the search criteria. Fixes zulip#1550.
@zulipbot zulipbot added size: S [Automatic label added by zulipbot] area: message rendering area: message search bug Something isn't working high priority should be done as soon as possible labels Oct 24, 2024
@u7327620 u7327620 marked this pull request as ready for review October 24, 2024 08:46
@neiljp
Copy link
Collaborator

neiljp commented Apr 4, 2025

@u7327620 Thanks for working on this 👍 This does appear to work from manual testing, but it seems like it could be simpler, and it's unclear why the extra logic is necessary. Including a test for the new logic would demonstrate this clearly.

I've not seen you around recently, so I'm marking this as a completion candidate.

@neiljp neiljp added the PR completion candidate PR with reviews that may unblock merging label Apr 4, 2025
@u7327620
Copy link
Collaborator Author

u7327620 commented Apr 9, 2025

Hello Neil! I looked through my notes:

Originally I had if self.model.is_search_narrow(): return True but it didn't exclude headers when searching private message chains or topic-narrows. In addition, tests (didn't write down which ones) failed due to the added headers. The added logic is meant to exclude these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: message rendering area: message search bug Something isn't working high priority should be done as soon as possible PR completion candidate PR with reviews that may unblock merging size: S [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search results should show recipient headers for every message
3 participants